Skip to content

Instantly share code, notes, and snippets.

@fxn
fxn / foo.cr
Last active May 10, 2024 20:36
# crystal build foo.cr --release
# ./foo 37.7749 -122.4194 34.0522 -118.2437
#
# Around 0.08s.
module GeoCalculator
EARTH_RADIUS_IN_KM = 6371.0
def self.distance(lat1, lon1, lat2, lon2)
dlat = lat2 - lat1
@GreatTaco
GreatTaco / marc-andreessen-library.md
Created December 6, 2017 17:20 — forked from ZackKanter/marc-andreessen-library.md
Marc Andreessen's Library
Book ID Title Author Links
1-A-1 Red Blood and Black Ink: Journalism in the Old West David Dary Amazon |
1-A-2 Media and the American Mind: From Morse to McLuhan Daniel J. Czitrom Amazon | Goodreads
1-A-3 A Social History of the Media: From Gutenberg to the Internet Peter Burke Amazon | Goodreads
1-A-4 Media Technology and Society: A History From the Telegraph to the Internet Brian Winston Amazon | Goodreads
1-A-5 The Television Will be Revolutionized Amanda D. Lotz Amazon | Goodreads
1-A-
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active May 10, 2024 20:28
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@yovko
yovko / ohmyzsh.md
Last active May 10, 2024 20:28
ZSH (using Oh My ZSH) on Manjaro Linux

ZSH (using Oh My ZSH) on Manjaro Linux

0. If ZSH is not already installed on your Manjaro system you can do it with the command:

sudo pacman -Syu zsh

You do not need to install manjaro-zsh-config and all the other related packages like zsh-syntax-highlighting, zsh-history-substring-search, zsh-autosuggestions, etc., as we will use Oh My Zsh.

@usametov
usametov / topics-search.txt
Created February 16, 2021 01:50
how to search github.com for multiple topics
Github.com ui .currently does not natively supoport search for multiple topic tags as of now. However their api allows you to query multiple tags. Below is a simple example to query github.com with ecs and go topic tags.
curl -H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories?q=topic:ecs+topic:go
Response from the github can be rather verbose so lets filter only relavant info such repo url and description.
curl -H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories\?q\=topic:ecs+topic:go | jq '.items[] | {url:.url, description:.description}'
@dhondta
dhondta / README.md
Last active May 10, 2024 20:24
Tinyscript steganography tool implementing the Pixel Value Differencing algorithm

StegoPVD

This Tinyscript-based tool allows to apply steganography based on PVD (Pixel Value Differencing) in order to retrieve hidden data from an image.

$ pip install tinyscript
$ tsm install stegopvd

@reinvanoyen
reinvanoyen / terminal-prompt-git-branch-zsh.md
Last active May 10, 2024 20:24
Add Git Branch Name to Terminal Prompt (MacOS zsh)

Add Git Branch Name to Terminal Prompt (zsh)

Updated for MacOS with zsh

  • Catalina
  • Big Sur
  • Monterey
  • Ventura
  • Sonoma

screenshot

@syahzul
syahzul / how-to-install-oci8-on-macos-10.15-catalina-with-php-7.3-7.4-homebrew.md
Last active May 10, 2024 20:22
How to install OCI8 on macOS 10.15 (Catalina) with PHP 7.3 or 7.4 (Homebrew)

How to install OCI8 on macOS 10.15 (Catalina) with PHP 7.3 or 7.4

Requirements

  • Homebrew
  • Command Line Tools for Xcode
  • PHP 7.3 or 7.4 via Homebrew

Preparation

@syahzul
syahzul / how-to-install-oci8-on-macos-monterey-m1-processor-with-php-81.md
Last active May 10, 2024 20:21
How to install OCI8 on macOS (Monterey) M1 Processor with PHP 8.1
@syahzul
syahzul / how-to-install-php-oci8-for-macos-ventura-sonoma-and-above-on-apple-silicon-macs.md
Last active May 10, 2024 20:21
How to install PHP OCI8 for macOS Ventura/Sonoma on Apple Silicon Macs

How to install PHP OCI8 for macOS Ventura/Sonoma on Apple Silicon Macs

Note
If your using macOS Monterey or below, please refer to How to install OCI8 on macOS (Monterey) M1 Processor with PHP 8.1

macOS Ventura and above, duplicating and renaming Terminal.app are disabled by Apple. In order to install the OCI8, we need to switch between arm64 and x86_64 architecture.

Install Rosetta

In Terminal, there is no automatic detection for missing Rosetta to run older architecture command line tools.